/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package cn.ac.iie.di.ban.metastore;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 *
 * @author xiaoliang
 */
public class Load2DBEntity implements Serializable {

    private String entityName;
    private String db;
    private String table;
    private String thread;
    private String loadNum;
    private String loadType;
    private Map<String, String> reDbColunms;
    private Map<String, String> colunmsFromDB = new HashMap<>();
    private List<String> dbCols = new ArrayList();
    private String MQName;
    private String group;
    
    /*
        mysql 构造器
     */

    public Load2DBEntity(String entityName, String db, String table, String thread, String loadNum, String loadType, String MQName, String group) {
        this.entityName = entityName;
        this.db = db;
        this.table = table;
        this.thread = thread;
        this.loadNum = loadNum;
        this.loadType = loadType;
        this.MQName = MQName;
        this.group = group;
    }

    public String getGroup(){
        return group;
    }
    public String getMQName(){
        return MQName;
    }

    public String getEntityName() {
        return entityName;
    }

    public String getDb() {
        return db;
    }

    public String getTable() {
        return table;
    }

    public Integer getThread() {
        return Integer.parseInt(thread);
    }

    public Integer getLoadNum() {
        return Integer.parseInt(loadNum);
    }

    public String getLoadType() {
        return loadType;
    }

    public Map<String, String> getReDbColunms() {
        return reDbColunms;
    }

    public Map<String, String> getColunmsFromDB() {
        if (colunmsFromDB.isEmpty()) {
            return null;
        }
        return colunmsFromDB;
    }

    public void setColunmsFromDB(Map<String, String> colunmsFromDB) {
        this.colunmsFromDB = colunmsFromDB;
    }

    public void setDbCols(List<String> dbCols) {
        this.dbCols = dbCols;
    }

    public List<String> getDbCols() {
        return dbCols;
    }
    
    
}
